<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for pages/data/index.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../prettify.css" />
    <link rel="stylesheet" href="../../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(../../sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="../../index.html">All files</a> / <a href="index.html">pages/data</a> index.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/29</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/2</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/5</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/29</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
	&lt;div class="data-page"&gt;
		&lt;dheader&gt;&lt;/dheader&gt;
		&lt;topnav&gt;&lt;/topnav&gt;
		&lt;div class="data-content"&gt;
			&lt;div class="data-time"&gt;
				 温馨提示: 后续还会继续加功能，请关注我github更新...
			&lt;/div&gt;
			&lt;div class="data-main"&gt;
				&lt;div class="main-left"&gt;
				  &lt;dleft :personalData="personalData" :username="username"&gt;&lt;/dleft&gt;
				&lt;/div&gt;
				&lt;div class="main-center"&gt;
					&lt;dcontent :numberData="numberData" :username="username"&gt;&lt;/dcontent&gt;
				&lt;/div&gt;
				&lt;div class="main-right"&gt;
					&lt;dright :username="username"&gt;&lt;/dright&gt;
				&lt;/div&gt;
			&lt;/div&gt;
		&lt;/div&gt;
		&lt;nouser :isShow="isShow"  v-if="isShow"&gt;&lt;/nouser&gt;
		&lt;loading v-if="pageShow"&gt;&lt;/loading&gt;
	&lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
<span class="cstat-no" title="statement not covered" >import dheader from './dheader'</span>
<span class="cstat-no" title="statement not covered" >import dleft from './dleft'</span>
<span class="cstat-no" title="statement not covered" >import dcontent from './dcontent'</span>
<span class="cstat-no" title="statement not covered" >import dright from './dright'</span>
export default {
  components:{
  	dheader,
  	dleft,
  	dcontent,
  	dright
  },
<span class="fstat-no" title="function not covered" >  data(){</span>
<span class="cstat-no" title="statement not covered" >  	return{</span>
  		isShow:false,
  		pageShow:true,
  		personalData:{},
  		numberData:{},
  		username:""
  	}
  },
<span class="fstat-no" title="function not covered" >  created(){</span>
<span class="cstat-no" title="statement not covered" >  	let username = this.$route.params.user</span>
<span class="cstat-no" title="statement not covered" >    this.getData(username)</span>
  },
  methods:{
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >  	getData(username){ </span></span>
<span class="cstat-no" title="statement not covered" >  		let self = this</span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        this.$axios.get('/api/users/'+ username).then((response)=&gt;{</span></span>
<span class="cstat-no" title="statement not covered" >            let res = JSON.parse(JSON.stringify(response))</span>
<span class="cstat-no" title="statement not covered" >            if(res.status === 200){</span>
<span class="cstat-no" title="statement not covered" >            	this.username = username</span>
<span class="cstat-no" title="statement not covered" >          	    let data = res.data</span>
          	    //个人图片、加入github时间
<span class="cstat-no" title="statement not covered" >          	    let sinceDate = data.created_at</span>
<span class="cstat-no" title="statement not covered" >          	    let joinDate = sinceDate.substring(0,10)</span>
<span class="cstat-no" title="statement not covered" >          	    let img   = data.avatar_url</span>
<span class="cstat-no" title="statement not covered" >          	    let objP  = {</span>
          	    	username: username,
          	    	joinDate: joinDate,
          	    	img: img
          	    }
<span class="cstat-no" title="statement not covered" >          	    this.personalData = objP</span>
          	    
          	    //仓库数、粉丝数、跟随数
<span class="cstat-no" title="statement not covered" >          	    let pubRepos = data.public_repos</span>
<span class="cstat-no" title="statement not covered" >          	    let followers = data.followers</span>
<span class="cstat-no" title="statement not covered" >          	    let following = data.following</span>
<span class="cstat-no" title="statement not covered" >          	    let objN  = {</span>
          	    	pubRepos: pubRepos,
          	    	followers: followers,
          	    	following: following
          	    }
<span class="cstat-no" title="statement not covered" >          	    this.numberData = objN</span>
          	    
<span class="cstat-no" title="statement not covered" >          	    this.pageShow = false</span>
			    }   
			   
<span class="cstat-no" title="statement not covered" >			return</span>
              
<span class="fstat-no" title="function not covered" >		    }).catch(err =&gt; {</span>
<span class="cstat-no" title="statement not covered" >		    	this.pageShow = false</span>
<span class="cstat-no" title="statement not covered" >		    	this.isShow = true</span>
<span class="cstat-no" title="statement not covered" >				console.log(err.message);</span>
			})
  	}
  	//计算年月
//	joindate(sinceDate){
//      var since = sinceDate.getFullYear();
//      var sinceMonth = sinceDate.getMonth();
//      return since + "-" + sinceMonth
//	}
  }
}
&lt;/script&gt;
&nbsp;
&lt;style lang="scss"&gt;
.data-page{
	background: url(../../assets/data/true.png) repeat-x;
	top: 0;
	right: 0;
	right: 0;
	bottom: 0;
	height: 100%;
    min-width: 1220px;
	.data-content {
	    padding-top: 20px;
	    padding-bottom: 20px;
	   .data-time {
		    width: 340px;
		    height: 35px;
		    background-color: #2C58A6;
		    line-height: 35px;
		    color: #fff;
		    font-size: 12.8px;
		    margin-bottom: 25px;
		    margin-left: 20px;
		    text-align: center;
		}
		.data-main {
		    width: calc(100% - 40px);
		    margin-bottom: 40px;
		    margin-left: 20px;
		    height: 720px;
		    
		    
		    .main-left{
		    	width: 24%;
		    	float: left;
		    }
		     .main-center{
		    	float: left;
		    	width: 52%;
		    	padding: 0 20px 0 20px;
		    	
		    }
		     .main-right{
		     	float: left;
		    	width: 24%;
		    	 height: 615px;
		    }
		}
	}		
}
&nbsp;
&lt;/style&gt;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Feb 14 2019 11:04:45 GMT+0800 (CST)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="../../sorter.js"></script>
</body>
</html>
